package review.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@Entity
@Table(name = "test_1")
@ApiModel(value = "测试实体")
public class Test1 implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "id", columnDefinition = "int")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@ApiModelProperty(value = "自增长主键")
	private Integer id;
	@ApiModelProperty(value = "性别")
	@Column(name = "sex", columnDefinition = "varchar(2)")
	private String sex;
	@ApiModelProperty(value = "姓名")
	@Column(name = "name", columnDefinition = "varchar(50)")
	private String name;
	@ApiModelProperty(value = "年龄", allowableValues = "range[18,59]")
	@Column(name = "age", columnDefinition = "int")
	private Integer age;

}
